package com.oocl.service.factory;

import com.oocl.proxy.ServiceProxy;
import com.oocl.service.MerchantManager;
import com.oocl.service.impl.MerchantManagerImpl;

public class MerchantManagerFactory {
	private static MerchantManagerImpl merchantManager = null;
	
	public synchronized static MerchantManager getInstance(){
		MerchantManager manager = null;
		ServiceProxy proxy = new ServiceProxy(uniqueInstance());
		manager = (MerchantManager) proxy.createProxy();
		return manager;
	}
	
	public static MerchantManagerImpl uniqueInstance(){
		if(merchantManager==null){
			merchantManager = new MerchantManagerImpl();
		}
		return merchantManager;
	}
}
